<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1 {
            width: 500px;
            height: 500px;
            border: 2px solid blue;
        }

        .box1 p {
            width: 100px;
            height: 100px;
            background: pink;
            transition: 2s;
        }

        .box1:hover p {
            transform: skewX(45deg);
        }

        .box2 {
            width: 500px;
            height: 500px;
            border: 2px solid blue;
        }

        .box2 p {
            width: 100px;
            height: 100px;
            background: pink;
            transition: 2s;
        }

        .box2:hover p {
            transform: skewY(45deg);
        }

        .box3 {
            width: 500px;
            height: 500px;
            border: 2px solid blue;
        }

        .box3 p {
            width: 100px;
            height: 100px;
            background: pink;
            transition: 2s;
        }

        .box3:hover p {
            transform: skew(40deg, 40deg);
        }
    </style>
</head>

<body>
    <div class="box1">
        <p>x轴倾斜</p>
    </div>
    <div class="box2">
        <p>y轴倾斜</p>
    </div>
    <div class="box3">
        <p>x,y轴倾斜</p>
    </div>
</body>

</html>